<table class="layui-table">
    <thead>
    <tr>
        <td>图书编号</td>
        <td>图书标题</td>
        <td>发布人</td>
        <td>更新时间</td>
        <td>图书状态</td>
        <td>管理操作</td>
    </tr>
    </thead>
    {present name='librarys'}
    {volist name='librarys' id='library'}
    <tr>
        <td>{$library.id}</td>
        <td>{$library.name}</td>
        <td>{$library.member.username}</td>
        <td>{$library.update_time}</td>
        <td class="layui-form">
            <input type="checkbox" lay-skin="switch" lay-filter="status" lay-text="ON|OFF" data-id="{$library.id}"  value="1" {eq name="library.status" value="1"} checked{/eq}>
        </td>
        <td class="textalign">
            <a href="javascript:library.edit('{$library.id}');" class="layui-btn layui-btn-small btn-success">
                编辑
            </a>
            <a href="javascript:library.delete('{$library.id}');"  class="layui-btn layui-btn-small btn-danger">
                删除
            </a>
        </td>
    </tr>
    {/volist}
    {/present}
</table>
<div class="fr mt20">
    总记录数：{$librarys->total()} {$librarys->render()}
</div>
